Merged
Conversation
Re-order changelog-LEGOExcels
Add temporary fixes for RoR & Inflows regarding scenarios
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for stochastic scenarios by introducing a Global_Scenarios table with related XML definitions, Excel reader/writer methods, and scenario‐based filtering in the CaseStudy API.
- Update changelog to document the new Global_Scenarios feature
- Extend TableDefinitions.xml with Global_Scenarios and its columns
- Implement
write_dGlobal_Scenarios,get_dGlobal_Scenarios, and scenario filtering in CaseStudy
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| changelog-LEGOExcels.md | Added Global_Scenarios section in the changelog |
| TableDefinitions.xml | Defined new Global_Scenarios table and added column metadata |
| ExcelWriter.py | Introduced write_dGlobal_Scenarios and updated writer combinations |
| ExcelReader.py | Added get_dGlobal_Scenarios reader function |
| CaseStudy.py | Integrated dGlobal_Scenarios in init and added scenario filtering |
Comments suppressed due to low confidence (5)
ExcelReader.py:64
- The docstring states this parameter is unused, but it is passed as
keep_excl_columnsto__read_non_pivoted_file. Please update the description to reflect its actual use.
:param keep_excluded_entries: Unused but kept for compatibility with other functions
ExcelWriter.py:196
- [nitpick] New I/O methods (
write_dGlobal_Scenarios) are introduced; adding unit tests or integration tests would help ensure correct file generation and catch future regressions.
def write_dGlobal_Scenarios(self, dGlobal_Scenarios: pd.DataFrame, folder_path: str) -> None:
TableDefinitions.xml:613
- It looks like 'relativeWeight' is being added under the Power_Hindex definition; confirm it belongs in the Global_Scenarios table definition instead.
<Column id="relativeWeight">
TableDefinitions.xml:627
- The 'scenarioID' column is defined here but appears intended for Global_Scenarios. Please verify placement under the correct TableDefinition.
<Column id="scenarioID">
CaseStudy.py:44
- Using
self.example_folderhere may be a typo; other files useself.data_folder. Confirm the correct base path is used for loading Global_Scenarios.
self.dGlobal_Scenarios = ExcelReader.get_dGlobal_Scenarios(self.example_folder + self.global_scenarios_file)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.